import React, { useEffect, useState } from 'react'
import useClientWidth from './useClientWidth'

export default function HookCom() {
  //使用 hook 函数 useClientWidth
  let width = useClientWidth();
  return (
    <div>
      <h2>当前窗口的视口宽度: {width}</h2>
    </div>
  )
}
